<!DOCTYPE html>
<html lang="en">

{include file='index/header'}

<body id="extension" class="flexv">
<div id="common-header" class="flex">
    <a href="{:url('Extension/index')}" class=" cBtn back"><i class="iconfont icon-back"></i></a>
    <h1>推广记录</h1>
    <a href="javascript:;" class="cBtn filter"><span>筛选</span></a>
</div>
<div class="flexitemv scroll main">
    <div class="flex tab">
        <a href="{:url('extenlist',['status'=>$Think.get.status])}" class="flexitemv center {eq name='Think.get.type' value=''}on{/eq}"><span>全部</span></a>
        <a href="{:url('extenlist',['status'=>$Think.get.status,'type'=>0])}" class="flexitemv center {eq name='Think.get.type' value='0'}on{/eq}"><span>待付款</span></a>
        <a href="{:url('extenlist',['status'=>$Think.get.status,'type'=>1])}" class="flexitemv center {eq name='Think.get.type' value='1'}on{/eq}"><span>已付款</span></a>
        <a href="{:url('extenlist',['status'=>$Think.get.status,'type'=>2])}" class="flexitemv center {eq name='Think.get.type' value='2'}on{/eq}"><span>已完成</span></a>
        <a href="javascript:;" class="flexitemv center {eq name='Think.get.type' value='3'}on{/eq}"><span>图文统计</span></a>
    </div>
    <ul class="list">
        {volist name='list.data' id='v'}
        <li>
            <div class="flex centerv title">
                <p class="type">{eq name='v.i_type' value='2'}付费套餐{else /}免费领取{/eq}</p>
                <p class="state">{eq name='v.i_status' value='0'}待付款{else /}已付款{/eq}</p>
            </div>
            <div class="flex goods-item">
                <a href="" class="flexitem">
                    <div class="img">
                        <a href="{:url('')}">
                            <img src="__ROOT__/public/uploads/{$v.product.p_photo}" alt="">
                        </a>
                    </div>
                    <div class="flexitemv content">
                        <h2>{$v.product.p_name}</h2>
                        <p>{eq name='v.i_type' value='1'}免费领取{else /}常规套装{/eq}{eq name='v.i_type' value='1'}{neq name='v.spec' value=''}  /  {$v.spec.s_name}¥{$v.spec.s_price}{/neq}  /  {eq name='v.i_packing' value='1'}正常包装 ¥5{else /}不包装{/eq}  /  邮费 ¥15{/eq}</p>
                        <span>¥ {$v.i_price} </span>

                    </div>
                </a>
            </div>
            <div class="flex centerv bottom">
                <div class="flexitemv tips">
                    <p>合计：<span>¥ {:round($v.i_totprice,2)}</span> &nbsp;&nbsp;&nbsp;{eq name='v.i_status' value='1'}{if condition='($v.i_type eq 2)'}{eq name='list.u_type' value='2'}推广积分：<span>60</span>{else /}推广积分：<span>18</span>{/eq}{else /}{eq name='list.u_type' value='2'}推广积分：<span>1</span>{/eq}{/if}{/eq}</p>
                    <time>{$v.create_time}</time><br/>
                    {neq name='v.exten' value=''}
                        <span style="padding-bottom: 5px">推广人：{$v.exten}</span>
                    {/neq}
                </div>
                <div class="flex operation">
                    {neq name='v.i_status' value='1'}
                        <a href="tel:{$v.i_phone}" class="active">联系买家</a>
                    {/neq}
                </div>
            </div>
        </li>
        {/volist}
    </ul>
</div>
{js href="__ROOT__/template/index/plugins/mobile/layer.js"}
{js href="__ROOT__/template/index/js/common.js"}
</body>
<script>
    /*推广记录页*/
    var extension = document.querySelector('#extension');

    if (extension) {
        /*筛选弹出层效果*/
        extension.querySelector('.filter').addEventListener('click', function () {
            layer.open({
                content: '<div class="sl"><a href="'+"{:url('Extension/extenList')}"+'" class="sl-item">全部推广</a><a href="'+"{:url('Extension/extenList',['status'=>1])}"+'" class="sl-item">付费套装推广</a><a href="'+"{:url('Extension/extenList',['status'=>2])}"+'" class="sl-item">免费领取推广</a></div>'
                ,skin: 'footer'
                ,btn: ['取消']
                ,anim: 'up'
            });
        });
    }
    /*推广记录页结束*/
</script>
{include file='index/footer'}
</html>